package com.njtoyo.taxi.admin.rest.controller.business;
import com.njtoyo.taxi.admin.aop.PassToken;
import com.njtoyo.taxi.admin.mapper.master.entity.VersionUpdate;
import com.njtoyo.taxi.admin.rest.pojo.dto.VersionUpdateParamDTO;
import com.njtoyo.taxi.admin.service.business.impl.VersionUpdateServiceImpl;
import com.taxi.entity.common.RestResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("business/versionUpdate")
@Api(tags = {"版本更新信息"})
public class VersionUpdateController {

    @Resource
    private VersionUpdateServiceImpl versionUpdateService;

    @GetMapping("/versionInfo")
    @ApiOperation(value = "版本信息")
    @PassToken
    RestResult<VersionUpdate> queryInfo() {
        VersionUpdateParamDTO dto = new VersionUpdateParamDTO();
        VersionUpdate versionUpdate = versionUpdateService.queryInfo(dto);
        return RestResult.success(versionUpdate);
    }
}
